import {BrowserRouter,Switch,Route,Redirect} from 'react-router-dom';

import React from 'react';

import Home from '../views/home'
import Login from '../views/login'
import Registry from '../views/registry'
import Detail from '../views/detail'
import Add from '../views/add'

function Router(){
    return <BrowserRouter>
         <Switch>
            <Route path='/home' component={Home}/>
            <Route path='/login' component={Login}/>
            <Route path='/registry' component={Registry}/>
            <Route path='/detail' component={Detail}/>
            <Route path='/add' component={Add}/>
            <Redirect from="/" to="/home"></Redirect> 
         </Switch>
    </BrowserRouter>
}

export default Router